#ifndef _L_RANDOM_111225_H
#define _L_RANDOM_111225_H

#include <ltypes.h>
#include <lmacros.h>

#include <time.h>
#include <boost/random.hpp>
#include <boost/pool/detail/singleton.hpp>

LLIB_BEGIN;
namespace math {

typedef boost::variate_generator< boost::mt19937, boost::uniform_01<> > randomVarGen_t;
static randomVarGen_t Rnd( boost::mt19937(boost::uint32_t(time(0))), boost::uniform_01<>() );
inline static Float RndRange(const Float minBound, const Float maxBound) { return Float((maxBound - minBound) * Rnd() + minBound); }

typedef boost::variate_generator< boost::mt19937, boost::uniform_int<> > randomVarGenI_t;
static randomVarGenI_t Rnd_i( boost::mt19937(boost::uint32_t(time(0))), boost::uniform_int<>(0x00000000,0x7fffffff) );
inline static Int32 RndRange(const Int32 minBound, const Int32 maxBound) { return Rnd_i() % (maxBound - minBound) + minBound; }

}
LLIB_END;

#endif